package com.ruleengine.task.impl;

import com.ruleengine.parser.ITaskContants;
import com.ruleengine.task.TaskType;

public class CallWorkflowTask extends BaseTask {
    
    public CallWorkflowTask() {
        super(TaskType.CALLWORKFLOW);
    }
    private String target;
    
    public String getTarget() {
        return target;
    }

    public void setTarget(String target) {
        this.target = target;
    }
    
    @Override
    public String toString() {
        // TODO Auto-generated method stub
        StringBuffer tag = new StringBuffer();
        if(target == null || "".equals(target)){
            tag.append("<"+ITaskContants.ELE_TAG_CALLWORKFLOW+" "+ITaskContants.ATTRI_TAG_TARGET+"=\""+ getTarget()+"\" />");
        }else{
            tag.append("<"+ITaskContants.ELE_TAG_CALLWORKFLOW+" />");
        }
        return tag.toString();
    }
    
}
